Pearlsen.DetailPage = {
	formId:"pageForm",
	loadRecord:function(record){
		var pageForm =  Ext.getCmp(this.formId);
		if(!pageForm){
			throw new Error("Pearlsen.DetailPage loadRecord pageForm is null ");
				return ;
		}
		if(!record){
			var parent = window.parent;
			var page = parent.tabs_3.window.Pearlsen.Page;
			if(!page){
				throw new Error("Pearlsen.Utils.form loadRecord is not record");
				return ;
			}
			record = page.currentRecord[0];
		}
		pageForm.loadRecord(record)
	},
	doSubmit:function(formId){
		var pageForm =  Ext.getCmp(formId);
		if(!pageForm){
			throw new Error("Pearlsen.DetailPage loadRecord pageForm is null ");
				return ;
		}
		pageForm.submit();
	},
	afterSubmit:function(result){
		if( result.success ){
			Pearlsen.Utils.closeTab();
			return;
		}
		Pearlsen.Utils.showErrorMsg("出错了,原因:"+result.message);
	},
	doCannel:function(){
		Pearlsen.Utils.closeTab();
	}
	
	
	
}